package com.zsc.wxm.ysh.anjo.house.controller;

import com.zsc.wxm.ysh.anjo.house.service.RequestLogService;
import com.zsc.wxm.ysh.anjo.result.Result;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

/**
 * 描述：
 *
 * @author playmaker
 * @since 2021/3/9 21:46
 */
@RestController
@RequestMapping("/house/request-log")
public class RequestLogController {

    @Resource
    private RequestLogService service;

    @GetMapping("/get-list/{viewRequestId}")
    @ApiOperation("获取看房请求日志")
    public Result getList(@PathVariable("viewRequestId") Long viewRequestId) {
        Map<String, Object> data = new HashMap<>(1);
        data.put("list", service.getList(viewRequestId));
        return Result.ok("获取成功", data);
    }
}
